using System;
using System.Collections.Generic;
using System.Text;
using System.Net;


public class WebClientEnhanced : WebClient
{

    private CookieContainer cookies = new CookieContainer();

    protected override WebRequest GetWebRequest(Uri address)
    {
        WebRequest request = base.GetWebRequest(address);
        if (request is HttpWebRequest)
        {
            (request as HttpWebRequest).CookieContainer = cookies;
        }
        return request;
    }
    
}
